import Cookies from 'js-cookie'

const TokenKey = 'token'
const timeOut = 'timeout'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token, { expires: 1 / 96 })
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function setTimeout(time) {
  return Cookies.set(timeOut, time)
}

export function getTimeout() {
  return Cookies.get(timeOut)
}

export function removeTimeout() {
  return Cookies.remove(timeOut)
}
